import static qj.util.SwingUtil.*;

import javax.swing.JTextField;

import qj.util.SwingUtil.RowAdder;
import qj.util.appCommon.swing.AppFrame;
import qj.util.funct.P0;


public class Temp4 {
	public static void main(String[] args) {
		final int[] i = {0};
		
		AppFrame appFrame = new AppFrame();
		
		RowAdder ra = rowAdder(appFrame);
		final JTextField tf = new JTextField("0");
		ra.whole(tf);
		ra.whole(panel(
				btn("+", new P0() {public void e() {
					i[0]++;
					tf.setText("" + i[0]);
				}}),
				btn("-", new P0() {public void e() {
					i[0]--;
					tf.setText("" + i[0]);
				}})
		));
		
		show(appFrame);
	}
}
